<?php
/**
 * Created by IntelliJ IDEA.
 * User: ahwwl
 * Date: 18-1-5
 * Time: 上午10:50
 */

namespace app\model;


class OrderList extends CommentModel
{
    protected $table="f_order_list";


    function addAgentCardOrder($agent_id,$company_id,$card_no,$card_type,$basic_price,$cost,$money,$card_fee,$total_money,$ip){
        $order_no = get_order_no("D");
        $info = [
            "order_no" => $order_no,
            "agent_id"=>$agent_id,
            "company_id"=>$company_id,
            "card_no" =>$card_no,
            "card_type" =>$card_type,
            "product_id" => 0,
            "goods_id" =>0,
            "basic_price"=>$basic_price,
            "cost" => $cost,
            "money" => $money,
            "card_fee"=>$card_fee,
            "discount_money"=>0,
            "total_money" =>$total_money,
            "mode" =>1,
            "pay_type"=>4,
            "pay_status"=>1,
            "status"=>2,
            "ctime" => NOW_TIME,
            "mtime" => NOW_TIME,
            "ip" => $ip,
            "is_rebate"=>0
        ];
        return $info;
    }
    function addCompanyCardOrder($agent_id,$company_id,$card_no,$card_type,$basic_price,$cost,$money,$card_fee,$total_money,$ip){
        $order_no = get_order_no("D");
        $info = [
            "order_no" => $order_no,
            "agent_id"=>$agent_id,
            "company_id"=>$company_id,
            "card_no" =>$card_no,
            "card_type" =>$card_type,
            "product_id" => 0,
            "goods_id" =>0,
            "basic_price"=>$basic_price,
            "cost" => $cost,
            "money" => $money,
            "card_fee"=>$card_fee,
            "discount_money"=>0,
            "total_money" =>$total_money,
            "mode" =>0,
            "pay_type"=>5,
            "pay_status"=>0,
            "status"=>0,
            "ctime" => NOW_TIME,
            "mtime" => NOW_TIME,
            "ip" => $ip,
            "is_rebate"=>0
        ];
        return $info;
    }
}